Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: LS Add A Code Action To Fix Return Type Signature #14737

Closed
wants to merge 6 commits into from

Conversation

rasika
Copy link
Contributor

@rasika rasika commented Mar 27, 2019

Purpose

Add a code action to fix return type signature of functions when the return type mismatches.

Fixes #13509

Approach

Suggest a code action, base on the diagnostic error message.

Samples

Before code action:

function addTwoIntegers2(int a, int b) {
   return (100, "");
}

After code action:

function addTwoIntegers2(int a, int b) returns (int, string) {
   return (100, "");
}

Remarks

N/A

Check List

  • Read the Contributing Guide
  • Required Balo version update
  • Updated Change Log
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@rasika rasika added Type/NewFeature Team/LanguageServer Language Server Implementation related issues. #Compiler labels Mar 27, 2019
@kaviththiranga kaviththiranga mentioned this pull request Apr 5, 2019
32 tasks
@Shan1024
Copy link
Member

@rasika - There seem to be some checkstyle issues. Shall we resolve them and the conflicts?

@rasika
Copy link
Contributor Author

rasika commented Apr 22, 2019

@Shan1024 Ack. Kept this as WIP since fix done for the Semantic Analyzer to change the error message is not consistent. Need to have a review on this.

@anupama-pathirage anupama-pathirage added the Team/CompilerFETools Semantic API, Formatter, Shell label Apr 30, 2019
@rasika
Copy link
Contributor Author

rasika commented May 2, 2019

Closing temporary

@rasika rasika closed this May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFETools Semantic API, Formatter, Shell Team/LanguageServer Language Server Implementation related issues. #Compiler Type/NewFeature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[VSCode plugin] Auto generate return signature
3 participants